<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<h:head>
		<title>用户管理</title>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
		<link rel="stylesheet" type="text/css" href="../css/default/skin.css" />
		<link rel="stylesheet" type="text/css" href="../css/jquery-ui-1.8.17.custom.css" />
		<script src="../js/jquery-1.7.1.min.js" type="text/javascript" />
		<script src="../js/jquery-ui-1.8.17.custom.min.js" type="text/javascript" />
	</h:head>
	<h:body class="bodymargin">
		<div class="uispTable">
			<div style="width: 100%;">
				<h:form><!--  id="userSearchForm" -->
					<h:outputText value="用户名："></h:outputText>
					<span class="midTxt"><h:inputText styleClass="longTxt"
							value="#{userBean.userName}"></h:inputText> </span>
					<h:outputText value="真实姓名："></h:outputText><span class="midTxt"><h:inputText styleClass="longTxt"
							value="#{userBean.trueName}"></h:inputText> </span>
					<h:outputText value="所属部门："></h:outputText><span class="midTxt"><h:inputText styleClass="longTxt"
							value="#{userBean.departmentName}"></h:inputText> </span>
					<span class="buttonLeft"> <h:commandButton id="searchBtn"
							styleClass="buttonRight" type="submit" value="查询"
							action="#{userBean.findUserInfoByConditions}"></h:commandButton>
					</span>
					<span class="buttonLeft"> <h:commandButton id="resetBtn"
							styleClass="buttonRight" type="reset" value="重置"></h:commandButton>
					</span>
					<div id="exportDiv" style="margin-top: 10px;">
						<span class="buttonLeft">
							<h:commandButton type="submit" action="#{userBean.editUserInfo}" actionListener="#{userBean.attrListener}" value="新建">
								<f:attribute name="operType" value="new" />
							</h:commandButton>
						</span>
						<span class="buttonLeft">
							<h:commandButton onclick="if(!confirm('您确认删除选中的用户吗？'))return false;" action="#{userBean.deleteUserInfo}" value="删除">
							</h:commandButton>
						</span>
						<!-- 
						<span class="buttonLeft"><input value="导入用户数据"
								i18n="importUser" id="import" class="buttonRight" type="button" />
						</span>
						<span class="buttonLeft"><input value="Assign Role"
								id="relateRole" i18n="relateRole" type="button" /> </span>
						<span class="buttonLeft"><input value="Enable/Disable"
								id="startend" i18n="startend" type="button" /> </span>
						<span class="buttonLeft"><input
								value="Password Initialization" id="initPassword"
								i18n="initPassword" type="button" /> </span>
						<span class="buttonLeft"><input value="Export Current Page"
								id="export" i18n="export_current" exportkey="userdata_header"
								type="button" /> </span>
						<span class="buttonLeft"><input value="Export All"
								id="exportall" i18n="export_all" exportkey="userdata_header"
								exportall="true" type="button" /> </span>
						<span class="buttonLeft" style="display: none"><input
								value="Email Enable/Disable" style="display: none;"
								id="emailEnableDisable" i18n="emailEnableDisable" type="button" />
						</span>
						<span class="buttonLeft" style="display: none"><input
								value="Email Configuration" style="display: none;"
								id="configEmail" i18n="configEmail" type="button" /> </span>
						<span class="buttonLeft" style="display: none;"><input
								style="display: none;" value="重设拼音" id="resetSpelling"
								class="buttonRight" type="button" /> </span>
						 -->
					</div>
				</h:form>
			</div>
			<table border="0" cellpadding="0" cellspacing="1" width="100%">
				<thead id="userdata_header">
					<tr>
						<td width="40px">
							<input id="userSelectAll"
								onclick="DataViewSupport.selectAll(this,'userdata_body');"
								type="checkbox" />
						</td>
						<td>
							序号
						</td>
						<td>
							用户名
						</td>
						<td>
							真实姓名
						</td>
						<td>
							所属部门
						</td>
						<td>
							状态
						</td>
						<td>
							邮件状态
						</td>
						<td>
							操作状态
						</td>
					</tr>
				</thead>

				<tbody id="userdata_body">
					<ui:repeat var="user" value="#{userBean.userList}"
						varStatus="status">
						<tr
							style="background: none repeat scroll 0% 0% rgb(255, 255, 255);"
							select="false">
							<td align="center">
								<input onclick="DataViewSupport.onSelectCheckClick(this);" value="0" rownum="0"
									type="checkbox" />
							</td>
							<td align="center">
								1
							</td>
							<td align="center">
								#{user.userName}
							</td>
							<td align="center">
								#{user.trueName}
							</td>
							<td align="center">
								#{user.department.departmentName}
							</td>
							<td align="center">
								Enabled
							</td>
							<td align="center">
								Enabled
							</td>
							<td align="left" width="10%">
								<h:form>
									<h:commandLink action="#{userBean.editUserInfo}" actionListener="#{userBean.attrListener}" target="_blank">
										<img src="../css/default/images/edit.gif" title="编辑"
											alt="编辑" border="0" />
										<f:param name="userId" value="#{user.userId}"></f:param>
										<f:attribute name="operType" value="edit" />
									</h:commandLink>
									<h:commandLink action="#{userBean.deleteUser}" onclick="if(!confirm('您确认删除选中的用户吗？'))return false;">
										<f:param name="userId" value="#{user.userId}"></f:param>
										<img
											src="../css/default/images/delete.gif" title="删除"
											alt="删除" border="0" />	
									</h:commandLink>		
								</h:form>
							</td>
						</tr>
					</ui:repeat>
				</tbody>
			</table>
			<div style="width: 100%;" id="showPageDiv_userdata_body"
				class="showPageDiv_pages">
				<a class="disable" id="firstButton_userdata_body"
					onclick='PageSupport.loadShowPage(this,PageSupport.PAGE_FIRST,"userdata_body");'><span
					class="text">First</span> </a>&nbsp;&nbsp;
				<a class="disable" id="prevButton_userdata_body"
					onclick='PageSupport.loadShowPage(this,PageSupport.PAGE_PREV,"userdata_body");'><span
					class="text">Previous</span> </a>&nbsp;&nbsp;
				<a class="disable" id="nextButton_userdata_body"
					onclick='PageSupport.loadShowPage(this,PageSupport.PAGE_NEXT,"userdata_body");'><span
					class="text">Next</span> </a>&nbsp;&nbsp;
				<a class="disable" id="lastButton_userdata_body"
					onclick='PageSupport.loadShowPage(this,PageSupport.PAGE_LAST,"userdata_body");'><span
					class="text">Last</span> </a>&nbsp;&nbsp;
				<span class="text"> Total 11 record(s). Current record(s)
					from 1 to 11. Current Page <font color="#ff0000"><b>1</b> </font>
					of total <font color="#ff0000"><b>1</b> </font> page(s)&nbsp;.
					Please enter page number:</span><span class="shortTxt"><input
						onfocus="this.select()"
						onkeypress='PageSupport.inputEnter(event,"userdata_body")'
						id="gopageEdit_userdata_body" size="3" value="1" type="text" /> </span>&nbsp;
				<span class="buttonLeft" style="margin-top: 0;"><input
						onclick="PageSupport.goPage('userdata_body');" value="go"
						type="button" /> </span>
			</div>
		</div>
		<div style="clear: both"></div>
		<div
			style="width: 100%; height: 100%; background: none repeat scroll 0% 0% rgb(255, 255, 255); position: absolute; top: 0pt; left: 0pt; display: none;"
			id="divshow_Cover">
			<span
				style="position: absolute; top: 45%; left: 45%; border: 1px solid #999; background-color: #ccc;"><p
					style="margin: 3px; border: 1px solid #999; background-color: #fff; padding: 10px;">
					<img src="userManagement_files/wait.gif">
						&nbsp;&nbsp;Loading.... </img>
				</p> </span>
		</div>
	</h:body>
</html>